<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>兼具大小写的最好英文字母</title>
</head>
<body>
  <!-- 思路：
  26个字母从末到尾遍历，看看在不在字符串里即可。
  String.fromCodePoint()转化码为字符。
  charCodeAt()转化字符为码。 -->
  <script>
    function fn(s) {
      for (let i = 0; i < 26; i++) {
        const max = String.fromCodePoint('Z'.charCodeAt() - i)
        const min = String.fromCodePoint('z'.charCodeAt() - i)
        if (s.includes(max) && s.includes(min)) {
          return max
        }
      }
      return ''
    }
    console.log(fn('lEeTcOdE'))
  </script>
</body>
</html>